package com.lanxiao.cloud.modules.log.domain;

import com.lanxiao.cloud.common.core.enums.OperationType;
import com.lanxiao.cloud.common.core.enums.StateEnum;
import java.util.Date;
import java.util.Map;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author ：qiaoliang
 * @date ：2021-10-15
 */

@Document(collection = "sys_log")
public class Log {
  @Id
  private String id;
  /** url **/
  private String url;
  /** 类名 **/
  private String className;
  /** 方法名 **/
  private String methodName;
  /** 内容描述 **/
  private String methodDescription;
  /** 请求参数 **/
  private Object requestParams;
  /** 返回参数 **/
  private Object responseParams;

  /** 服务 **/
  private Topic topic;
  /** 浏览器 **/
  private String browser;
  /** 操作系统 **/
  private String operatingSystem;
  /** 内容 **/
  private Object content;
  /** 类型 **/
  private OperationType type;
  /** ip地址 **/
  private String ip;
  /** 地区 **/
  private String region;
  /** 操作者 **/
  private String createBy;
  /** 操作时间 **/
  private Date createTime;
  /** 成功失败 **/
  private StateEnum state;
  /** 失败描述 **/
  private String errorMessage;

  /** 耗时 **/
  private Long timeConsuming;

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getUrl() {
    return url;
  }

  public void setUrl(String url) {
    this.url = url;
  }

  public String getClassName() {
    return className;
  }

  public void setClassName(String className) {
    this.className = className;
  }

  public String getMethodName() {
    return methodName;
  }

  public void setMethodName(String methodName) {
    this.methodName = methodName;
  }

  public Object getRequestParams() {
    return requestParams;
  }

  public void setRequestParams(Object requestParams) {
    this.requestParams = requestParams;
  }

  public Object getResponseParams() {
    return responseParams;
  }

  public void setResponseParams(Object responseParams) {
    this.responseParams = responseParams;
  }

  public Topic getTopic() {
    return topic;
  }

  public void setTopic(Topic topic) {
    this.topic = topic;
  }

  public String getBrowser() {
    return browser;
  }

  public void setBrowser(String browser) {
    this.browser = browser;
  }

  public String getOperatingSystem() {
    return operatingSystem;
  }

  public void setOperatingSystem(String operatingSystem) {
    this.operatingSystem = operatingSystem;
  }

  public String getMethodDescription() {
    return methodDescription;
  }

  public void setMethodDescription(String methodDescription) {
    this.methodDescription = methodDescription;
  }

  public Object getContent() {
    return content;
  }

  public void setContent(Object content) {
    this.content = content;
  }

  public OperationType getType() {
    return type;
  }

  public void setType(OperationType type) {
    this.type = type;
  }

  public String getIp() {
    return ip;
  }

  public void setIp(String ip) {
    this.ip = ip;
  }

  public String getRegion() {
    return region;
  }

  public void setRegion(String region) {
    this.region = region;
  }

  public String getCreateBy() {
    return createBy;
  }

  public void setCreateBy(String createBy) {
    this.createBy = createBy;
  }

  public Date getCreateTime() {
    return createTime;
  }

  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
  }

  public StateEnum getState() {
    return state;
  }

  public void setState(StateEnum state) {
    this.state = state;
  }

  public String getErrorMessage() {
    return errorMessage;
  }

  public void setErrorMessage(String errorMessage) {
    this.errorMessage = errorMessage;
  }

  public Long getTimeConsuming() {
    return timeConsuming;
  }

  public void setTimeConsuming(Long timeConsuming) {
    this.timeConsuming = timeConsuming;
  }
}
